import request from '@/utils/request'


// 分页查询电表规则
export function selectPage(query) {
  return request({
    url: '/apartment/eRule/selectPage',
    method: 'get',
    params: query
  })
}

// 添加电表规则
export function saveRule(form) {
  return request({
    url: '/apartment/eRule/saveRule',
    method: 'post',
    data: form
  })
}

// 修改电表规则
export function updateRule(form) {
  return request({
    url: '/apartment/eRule/updateRule',
    method: 'put',
    data: form
  })
}

// 删除规则
export function delRule(id) {
  return request({
    url: '/apartment/eRule/delRule/' + id,
    method: 'delete',
  })
}
